<template>
  <div class="tips-block">
    <el-collapse v-model="tips">
      <el-collapse-item name="a">
        <template #title>
          <div class="tips-title ">
            <div class="title-area">
              <img src="@/assets/images/comm/tip-icon.png">
              {{ title }}
            </div>
            <div>{{ tips.length == 0 ? "展开提示" : "收起提示" }}</div>
          </div>
        </template>

        <div class="tips-list">
          <div v-for="item, index in tipsText" class="item"> {{ item }}</div>

        </div>
      </el-collapse-item>
    </el-collapse>
  </div>

</template>

<script setup lang="ts">
import { ref } from "vue"

const props = withDefaults(defineProps<{
  tipsText?: Array<string>,
  title?: string
}>(), {
  tipsText: () => ['1.默认按空间区域设计吊顶造型', '2.可以选多个连续区域直接做吊顶造型设计，如果连续区域的标高不同，则按多个区域的最低标高默认标高', '3.如果吊顶造型设计区域需要重新划分，请在平面图中用工具进行区域划分。注意，重新划分区域后会同时取消该区域已经设计好的造型'],
  title: "造型设计提示"
})
const tips = ref(['a'])

</script>
<style lang="scss" scoped>
.tips-block {
  overflow: hidden;

  :deep(.el-collapse-item .is-active) {
    background-color: var(--tips-bg);
  }

  :deep(.el-collapse-item__header) {
    background-color: var(--tips-bg);
  }

  :deep(#el-collapse-head-0) {
    height: 32px;
  }

  :deep(.el-collapse-item__content) {
    background-color: var(--tips-bg);
    padding-bottom: 10px;

  }

  .tips-title {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding-left: 16px;
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    color: var(--, #555);
    font-family: 'PingFang SC';

    .title-area {
      display: flex;
      align-items: center;
      color: #333;
      font-weight: 500;

      img {
        margin-right: 6px;
      }
    }

  }

  .tips-list {
    padding-left: 38px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    font-size: 10px;
    font-family: 'PingFang SC';
    color: #326bff;

  }
}
</style>